﻿/*----------------------------------------------------------------
// Copyright (C) 2011 上海
// 版权所有。 
//
// 文件名：WarehouseVM
// 文件功能描述：供应商管理models层
//
// 
// 创建标识：2012-02-08 王冲
//
// 修改标识：
// 修改描述：
//
//
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace WaiGaoQiaoWeb.Models
{
    public class SupplierVM
    {
        [Display(Name = "ID主键")]
        public int ID
        {
            get;
            set;
        }
        
        [Required(ErrorMessage = "编码不能为空！")]
        [Display(Name = "供应商编码")]
        [StringLength(50, ErrorMessage = "编码不能超过50个字符！")]
        [Remote("CheckSupplierNo", "Supplier", AdditionalFields = "Supplier_NO,OldSupplier_NO,AddEdit", HttpMethod = "POST", ErrorMessage = "已存在此供应商编号")]
        public string Supplier_NO
        {
            get;
            set;
        }

        [Required(ErrorMessage = "名称不能为空！")]
        [Display(Name = "供应商名称")]
        [StringLength(50, ErrorMessage = "名称不能超过50个字符！")]
        public string Supplier_Name
        {
            get;
            set;
        }

        [Display(Name = "联系人")]
        [StringLength(50, ErrorMessage = "联系人不能超过50个字符！")]
        public string Contact_Person
        {
            get;
            set;
        }

        [Display(Name = "电话")]
        [StringLength(50, ErrorMessage = "电话不能超过50个字符！")]
        public string Phone
        {
            get;
            set;
        }

        [Display(Name = "供应商地址")]
        [StringLength(50, ErrorMessage = "地址不能超过50个字符！")]
        public string AddRess
        {
            get;
            set;
        }

        [Display(Name = "备注")]
        [StringLength(50, ErrorMessage = "备注不能超过50个字符！")]
        public string Remark
        {
            get;
            set;
        }

        [Display(Name = "录入时间")]
        public DateTime RecordDateTime
        {
            get;
            set;
        }

        public string AddEdit
        {
            get;
            set;
        }

        public string OldSupplier_NO
        {
            get;
            set;
        }
    }
}